import React, { useRef,useEffect } from 'react'

export default function UseRef() {
    const h1Ref= useRef(null)
    useEffect(()=>{
        console.log(h1Ref.current);
    },[])
  return (
    <div>
        {/* <h1 ref={h1Ref}>我是一个小盒子</h1> */}
        <input type="text" ref={h1Ref}/>
    </div>
  )
}
